package com.code.springbootmybatismysql.service;

import com.code.springbootmybatismysql.mapper.UserMapper;
import com.code.springbootmybatismysql.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/*
 * @author: liyufei
 * @date: 2018-05-29 11:03
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public User getUserByUsername(String username) {
        return userMapper.getUserByUsername(username);
    }

    public void insertUser(User user) {
        userMapper.insertUser(user);
    }
}
